<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
    <title>websocket</title>
</head>
<body>
</body>
<script>
    var ws = new WebSocket("ws://39.100.78.46:8000/");
    ws.onopen = function(evt) {
        console.log("Connection success");
        //ws.send("Hello WebSockets!");
    };
    ws.onmessage = function(evt) {
        console.log( "Received Message: " + evt.data);
        //ws.close();
        /*
        setTimeout(function(){
              ws.send("ping");
        }, 1000 );
        */
    };
    ws.onclose = function(evt) {
        console.log("Connection closed.");
    };
</script>
</html>